package logs;

import java.io.IOException;  
import java.util.logging.FileHandler;
import java.util.logging.Logger; 
import java.util.logging.SimpleFormatter;

public class MyLogger
{
	public void startLogger()
	{
		Logger logger = Logger.getLogger("MyLog");
		FileHandler fh;
    
		try 
		{
			fh = new FileHandler("logfile");
			logger.addHandler(fh);
			SimpleFormatter formatter = new SimpleFormatter();
			fh.setFormatter(formatter);
		} 
		catch (SecurityException e) 
		{
			e.printStackTrace();
		} 
		catch (IOException e) 
		{
			e.printStackTrace();
		}
	}
}